docs: Update list widgets docs
authorAndreas Persson <andreasp56@outlook.com>
Sun, 6 Sep 2020 15:19:24 +0000 (17:19 +0200)
committerAndreas Persson <andreasp56@outlook.com>
Sun, 6 Sep 2020 15:19:24 +0000 (17:19 +0200)
Removed sentence that claimed the view will wrap the model in a
GtkSingleSelection, as it's no longer true. Fixed the code example in
GtkListView for the same reason. Fixed a small typo in GtkDropDown docs.

gtk/gtkcolumnview.c
gtk/gtkdropdown.c
gtk/gtkgridview.c
gtk/gtklistview.c

index c3cb62839e6b38adbeda8c49124caaf439aa62ae..57d56fa080cbf769286af5275bd0ed0ead86e0b3 100644 (file)
  * separators between the rows or columns.
  *
  * GtkColumnView allows the user to select items according to the selection
- * characteristics of the model. If the provided model is not a #GtkSelectionModel,
- * GtkColumnView will wrap it in a #GtkSingleSelection. For models that allow
- * multiple selected items, it is possible to turn on *rubberband selection*,
- * using #GtkColumnView:enable-rubberband.
+ * characteristics of the model. For models that allow multiple selected items,
+ * it is possible to turn on *rubberband selection*, using
+ * #GtkColumnView:enable-rubberband.
  *
  * The column view supports sorting that can be customized by the user by
  * clicking on column headers. To set this up, the #GtkSorter returned by
index feebfa188815305f3dc96d63813e02fc5b5e329d..2cbd04e6a63e6fc25bc9e44189a86c1d5cfbd25f 100644 (file)
@@ -909,7 +909,7 @@ gtk_drop_down_get_enable_search (GtkDropDown *self)
  *
  * Sets the expression that gets evaluated to obtain strings from items
  * when searching in the popup. The expression must have a value type of
- * #GTK_TYPE_STRING.
+ * #G_TYPE_STRING.
  */
 void
 gtk_drop_down_set_expression (GtkDropDown   *self,
index f20c34ba84308ee6623820c20661a5acacdeb270..ba8ce422afe9f238af16359e06373711754188c1 100644 (file)
  * grid reflows vertically or horizontally.
  *
  * GtkGridView allows the user to select items according to the selection
- * characteristics of the model. If the provided model is not a #GtkSelectionModel,
- * GtkGridView will wrap it in a #GtkSingleSelection. For models that allow
- * multiple selected items, it is possible to turn on _rubberband selection_,
- * using #GtkGridView:enable-rubberband.
+ * characteristics of the model. For models that allow multiple selected items,
+ * it is possible to turn on _rubberband selection_, using
+ * #GtkGridView:enable-rubberband.
  *
  * To learn more about the list widget framework, see the [overview](#ListWidget).
  *
index e7f2cf18bbd172df3319558a4693c047f5f2d24e..d04799b3a41622058301b55c8d0d1f6275f27fa3 100644 (file)
  * between the rows.
  *
  * GtkListView allows the user to select items according to the selection
- * characteristics of the model. If the provided model is not a #GtkSelectionModel,
- * GtkListView will wrap it in a #GtkSingleSelection. For models that allow
- * multiple selected items, it is possible to turn on _rubberband selection_,
- * using #GtkListView:enable-rubberband.
+ * characteristics of the model. For models that allow multiple selected items,
+ * it is possible to turn on _rubberband selection_, using
+ * #GtkListView:enable-rubberband.
  *
  * If you need multiple columns with headers, see #GtkColumnView.
  *
@@ -95,7 +94,7 @@
  * {
  *   GAppInfo *app_info;
  *
- *   app_info = g_list_model_get_item (gtk_list_view_get_model (list), position);
+ *   app_info = g_list_model_get_item (G_LIST_MODEL (gtk_list_view_get_model (list)), position);
  *   g_app_info_launch (app_info, NULL, NULL, NULL);
  *   g_object_unref (app_info);
  * }
  *   g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
  *   g_signal_connect (factory, "bind", G_CALLBACK (bind_listitem_cb), NULL);
  *
- *   list = gtk_list_view_new (model, factory);
+ *   list = gtk_list_view_new (GTK_SELECTION_MODEL (gtk_single_selection_new (model)), factory);
  *
  *   g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
  *